package com.linkage.educloud.ah.view.activity.login;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.FrameLayout;

import com.linkage.educloud.ah.R;
import com.linkage.educloud.ah.view.BasicActivity;
import com.linkage.educloud.ah.view.fragment.login.LoginFragment;

import butterknife.BindView;

/**
 * <desc>
 * Created by The Moss on 2018/8/6.
 */

public class LoginActivity extends BasicActivity {
    @BindView(R.id.fragment_content)
    FrameLayout fragmentContent;
    @Override
    protected int attachLayoutRes() {
        return R.layout.activity_common;
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        setStatusTranslate(false);
        super.onCreate(savedInstanceState);
        initFragment();
    }

    private void initFragment(){
        mTransaction.add(R.id.fragment_content, LoginFragment.newInstance(),"login")
//                .addToBackStack(SplashFragment.class.getSimpleName())
                .commit();
    }
//    @Override
//    public void onBackPressed() {
//        Fragment fragment = mManager.findFragmentById(R.id.fragment_content);
//        if (fragment instanceof AbstractFragment) {
//            if (BasicTitleFragment.onBackPressed()) {
//                return;
//            }
//        }
//        super.onBackPressed();
//    }
}
